const path = require('path')

module.exports = {
  chainWebpack: config => {
    config.resolve.alias
      .set('@common', path.join(__dirname, 'src', 'common'))
      .set('@assets', path.join(__dirname, 'src', 'assets'))
      .set('@img', path.join(__dirname, 'src', 'assets', 'img'))
      .set('@components', path.join(__dirname, 'src', 'components'))
      .set('@commoncpn', path.join(__dirname, 'src', 'components', 'common'))
      .set('@contentcpn', path.join(__dirname, 'src', 'components', 'content'))
      .set('@network', path.join(__dirname, 'src', 'network'))
      .set('@views', path.join(__dirname, 'src', 'views'))

    config.plugin('html').tap(args => {
      args[0].title = '超级商城'
      return args
    })
  }
}
